In [ ]:
from pyCMR.pyCMR import CMR
Provide config file
In [ ]:
cmr=CMR("../cmr.cfg")
In [ ]:
results = cmr.searchCollection(spatial_keyword='nepal',keyword='vegetation')
print("Obtained '%s' result." % len(results))
print(results)
In [ ]:
for res in results:
print(res['Collection']['DataSetId'])
print("Short Name: "+ res['Collection']['ShortName'])
if res['Collection']['ArchiveCenter'] is not None:
print("Archive Center: " + res['Collection']['ArchiveCenter'])
if res['Collection']['Description'] is not None:
print("Description: " + res['Collection']['Description'])
if res['Collection']['Spatial']['HorizontalSpatialDomain']['Geometry']['BoundingRectangle'] is not None:
print("Bounding Rectangle: " + str(res['Collection']['Spatial']['HorizontalSpatialDomain']['Geometry']['BoundingRectangle']))
print("================================================")